Hex Minesweeper is exactly what it sounds like: Minesweeper with hexagons.

Overview

Hexagonal Minesweeper is a twist on the classic Minesweeper game from the 1990's: instead of the board being made up of squares, it is made up of hexagons! Minesweeper has always been one of my favorite classic video games, and I wanted to recreate it while also experimenting with hexagon designs.

The game begins with a blank board, where a user repeatedly clicks on hex spaces to reveal them. If the player clicks on a mine, the game is lost! One must click on all of the hexes that aren't mines to win the game. Each hex that's revealed displays the number of mines that are immediate neighbors of the hex. Based on the numbers, you are able to deduce where the mines are located! Like the classic game, a player can "flag" hexes to help keep track of which ones are mines. Furthermore, the player never loses on the first move. More detailed rules are included on the game's website.

Technical Aspects

To guarentee that the user's first click is always safe, I generate the board instantly after the player makes the first move in the game. The hex cell that is clicked on as well as all of its surrounding neighbors are all set to be safe, and the remaining spaces are chosen at random to be mine locations.

Users can choose between 4 different board sizes when generating a new game. Hexagonal Minesweeper is fully playable on both Desktop and Mobile

To add an additional objective to the game, a timer begins as soon as the user makes a first move on the board, and the timer is shown at the end of the game. This provides an incentive for the user to improve at the game so they can solve boards in less time.

Hexagonal Minesweeper was programmed in TypeScript.

Example gampeplay showing the user "flagging" hexes that have mines. Example gameplay with a game over screen, showing how close the user was to winning and time elapsed.